
% k=3;
cl1_pl=1.0;
cl2_pl=2.0;
cl3_pl=3.0;

cl1_pw=0.0;
cl2_pw=1.0;
cl3_pw=2.0;

cl1_sl=5.0;
cl2_sl=6.0;
cl3_sl=7.0;

cl1_sw=2.0;
cl2_sw=2.5;
cl3_sw=3.0;

k=0;
count_c1=0;
count_c2=0;
count_c3=0;

cl1=0;
cl2=0;
cl3=0;

    flag =1;
    while flag~=0
       k=k+1;
  [cl1_pl,cl2_pl,cl3_pl,cl1_pw,cl2_pw,cl3_pw,cl1_sl,cl2_sl,cl3_sl,cl1_sw,cl2_sw,cl3_sw,k1,cluster] = distance(cl1_pl,cl2_pl,cl3_pl,cl1_pw,cl2_pw,cl3_pw,cl1_sl,cl2_sl,cl3_sl,cl1_sw,cl2_sw,cl3_sw,k,plength,pwidth,slength,swidth);
  
  flag =comp(k,k1,cluster);

    end
    
    
    
    disp('Cluster 1');
    for i= 1:150
        if strcmp(cluster(k1,i),'1') disp(i);
        end
    end
    
    
     disp('Cluster 2');
    for i= 1:150
        if strcmp(cluster(k1,i),'2') disp(i);
        end
    end
    
 disp('Cluster 3');
    for i= 1:150
        if strcmp(cluster(k1,i),'3') disp(i);
        end
    end  

